import request from '@/utils/request'

// 获取访客统计数据
export function getVisitorStats() {
  return request({
    url: '/visitors/stats',
    method: 'get'
  })
}

// 获取访客趋势数据
export function getVisitorTrend(days: number) {
  return request({
    url: '/visitors/trend',
    method: 'get',
    params: { days }
  })
}

// 获取访问来源数据
export function getVisitorSource() {
  return request({
    url: '/visitors/sources',
    method: 'get'
  })
}

// 获取最近访问记录
export function getRecentVisits(params: { page: number, limit: number }) {
  return request({
    url: '/visitors/records',
    method: 'get',
    params
  })
} 